/* === 弹窗样式 === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.player-modal {
  background-color: #2d3136;
  border-radius: 6px;
  width: 1200px;
  max-width: 95%;
  height: 90vh;
  max-height: 800px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  color: #e0e0e0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.modal-header {
  padding: 15px 20px;
  background-color: #1e2124;
  color: white;
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid #40444b;
}

.header-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.header-subtitle {
  font-size: 0.95rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  background-color: #4e5d94;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-btn:hover {
  background-color: #5d6ca3;
}

.modal-body {
  padding: 0;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.player-main-info {
  display: flex;
  height: 100%;
}

.player-info-section {
  width: 40%;
  background-color: #2d3136;
  border-right: 1px solid #40444b;
}

/* 修改后的玩家信息头部布局 */
.player-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 10px; /* 减少上下内边距 */
  border-bottom: 1px solid #424242;
  background-color: rgba(63, 63, 63, 0.1);
  margin: 0 -20px 10px -20px; /* 减少下边距 */
}

.player-avatar {
  width: 80px; /* 稍微减小头像尺寸 */
  height: 80px;
  border-radius: 50%;
  border: 2px solid #00ff40; /* 减细边框 */
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 减小阴影 */
  margin-bottom: 8px; /* 减少头像与名称的间距 */
}

.player-name {
  font-size: 1.5rem; /* 减小字体大小 */
  font-weight: bold;
  color: white;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 减小文字阴影 */
  margin-bottom: 6px; /* 减少名称与SteamID的间距 */
}

.player-steamid {
  font-size: 0.95rem; /* 减小字体大小 */
  color: #b9bbbe;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px; /* 减少元素间距 */
}

.killfeed-section {
  width: 66.67%;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.killfeed-controls {
  padding: 10px 15px;
  background-color: #36393f;
  border-bottom: 1px solid #40444b;
}

.filter-btns {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 5px 12px;
  background-color: #40444b;
  color: #b9bbbe;
  border: none;
  border-radius: 3px;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-btn.active {
  background-color: #4e5d94;
  color: white;
}

.killfeed-list {
  flex-grow: 1;
  overflow-y: auto;
}

/* 调整后的信息网格布局 */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.info-item {
  padding-left: 25px;
  padding-right: 25px;
}

.info-label {
  font-size: 1rem;
  color: #b9bbbe;
  margin-bottom: 5px;
}

.info-value {
  font-size: 1rem;
  font-weight: 500;
  word-break: break-all;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 15px;
}

.stat-item {
  background-color: #36393f;
  border-radius: 5px;
  padding: 12px;
  text-align: center;
}

.stat-label {
  font-size: 0.9rem;
  color: #b9bbbe;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ffffff;
}

.killfeed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.killfeed-table th {
  text-align: left;
  padding: 12px 15px;
  background-color: #36393f;
  color: #b9bbbe;
  font-weight: normal;
  border-bottom: 1px solid #40444b;
  position: sticky;
  top: 0;
}

.killfeed-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #40444b;
}

.killfeed-table tr:last-child td {
  border-bottom: none;
}

.killfeed-table tr.kill {
  background-color: rgba(76, 175, 80, 0.05);
}

.killfeed-table tr.death {
  background-color: rgba(244, 67, 54, 0.05);
}

.killfeed-table tr.construction,
.killfeed-table tr.revive {
  background-color: rgba(33, 150, 243, 0.05);
}

.damage {
  color: #ff9800;
  text-align: left;
  padding-right: 15px;
}

.weapon {
  color: #b9bbbe;
  font-style: italic;
}

.modal-footer {
  padding: 10px 15px;
  background-color: #1e2124;
  border-top: 1px solid #40444b;
  border-radius: 0 0 6px 6px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.footer-btn {
  padding: 8px 15px;
  min-width: 80px;
  border-radius: 4px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-align: center;
}

.steam-btn {
  background-color: #1b2838;
  color: white;
}

.steam-btn:hover {
  background-color: #2a475e;
}

.switch-btn {
  background-color: #4e5d94;
  color: white;
}

.switch-btn:hover {
  background-color: #5d6ca3;
}

.kick-btn {
  background-color: #d32f2f;
  color: white;
}

.kick-btn:hover {
  background-color: #f44336;
}

.warn-btn {
  background-color: #ff9800;
  color: white;
}

.warn-btn:hover {
  background-color: #ffa726;
}

.chat-btn {
  background-color: #4caf50;
  color: white;
}

.chat-btn:hover {
  background-color: #66bb6a;
}

/* 复制按钮图标样式 */
.copy-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 5px;
  color: #b9bbbe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
}

.copy-btn-icon:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.copy-btn-icon svg {
  width: 14px;
  height: 14px;
}
